#ifndef __DRV_DJI_H
#define __DRV_DJI_H
#include "main.h"
#include "drv_gm6020.h"
#include "bsp_can.h"

#define DJI_CHANNEL_1FF           0x1ff
#define DJI_CHANNEL_200           0x200
#define DJI_CHANNEL_2FF           0x2ff


typedef struct {
  uint16_t channel_id;
  uint16_t data[4];
} dji_channel_t;

extern dji_channel_t dji_channel_1;
extern dji_channel_t dji_channel_2;
extern dji_channel_t dji_channel_3;

void DJI_Channel_Init(void);
void DJI_RegData(uint8_t channel_id, uint8_t in_id, uint16_t data);
uint8_t DJI_SendData(dji_channel_t* dji_ptr);
#endif
